ubuntu下安装vnc出错(灰屏)

您所在的位置:网站首页 远程ubuntu server灰色屏幕 ubuntu下安装vnc出错(灰屏)

ubuntu下安装vnc出错(灰屏)

2024-07-12 00:06| 来源: 网络整理| 查看: 265

我 win10 用的 vncviewer.exe,

在Ubuntu上首先需要安装vnc4server # apt-get install vnc4server

出现灰色屏幕和×型鼠标是因为vncserver找不到指定的图形化组件,

错误提示如下:在软件的下方提示的,大概2s就消失了

查看/home/用户名/.vnc/*.log   可以看到日志文件 cat /home/用户名/.vnc/*.log

提示:

error opening security policy file /etc/X11/xserver/SecurityPolicy Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list! Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list! Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!

这是没有找到文件,无法初始化,所以运行如下命令即可解决:

5. 需要更改~/.vnc/xstartup文件

在安装之前,我们先安装如下软件:

$sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

然后修改xstartup文件

#!/bin/sh # Uncomment the following two lines for normal desktop: export XKL_XMODMAP_DISABLE=1 unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc unset DBUS_SESSION_BUS_ADDRESS gnome-panel & gnmoe-settings-daemon & metacity & nautilus & gnome-terminal &

Ubuntu:

mkdir /usr/X11R6/lib/X11/ cd /usr/X11R6/lib/X11 ln -s /usr/share/fonts/X11/ fonts

重启VNCserver就ok了。

安装VNC详细教程:在Ubuntu 16.04上安装和配置VNC_ubuntu安装vnc_boss-dog的博客-CSDN博客

如何安装Ubuntu 18图形化桌面? (aliyun.com)

需要注意的是,在这篇教程的自启动配置中,配置文件可能位于:/usr/lib/systemd/system/*



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3